package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallOrderRefund;
import com.appkubes.mall.core.po.MallOrderRefundExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallOrderRefundMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order_refund
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallOrderRefundSqlProvider.class, method="countByExample")
    long countByExample(MallOrderRefundExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order_refund
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallOrderRefundSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallOrderRefundExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order_refund
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_order_refund",
        "where order_key = #{orderKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String orderKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order_refund
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_order_refund (order_key, app_key, ",
        "user_key, version)",
        "values (#{orderKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{userKey,jdbcType=VARCHAR}, #{version,jdbcType=INTEGER})"
    })
    int insert(MallOrderRefund record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order_refund
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallOrderRefundSqlProvider.class, method="insertSelective")
    int insertSelective(MallOrderRefund record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order_refund
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallOrderRefundSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="order_key", property="orderKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallOrderRefund> selectByExampleWithRowbounds(MallOrderRefundExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order_refund
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallOrderRefundSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="order_key", property="orderKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallOrderRefund> selectByExample(MallOrderRefundExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order_refund
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "order_key, app_key, user_key, version",
        "from mall_order_refund",
        "where order_key = #{orderKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="order_key", property="orderKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallOrderRefund selectByPrimaryKey(String orderKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order_refund
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallOrderRefundSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallOrderRefund record, @Param("example") MallOrderRefundExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order_refund
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallOrderRefundSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallOrderRefund record, @Param("example") MallOrderRefundExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order_refund
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallOrderRefundSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallOrderRefund record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_order_refund
     *
     * @mbg.generated
     */
    @Update({
        "update mall_order_refund",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "user_key = #{userKey,jdbcType=VARCHAR},",
          "version = #{version,jdbcType=INTEGER}",
        "where order_key = #{orderKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallOrderRefund record);
}